const { DataTypes } = require("sequelize");
const sequelize = require("../config/sequelize");

const TopicCategory = sequelize.define(
  "TopicCategory",
  {
    name: {
      type: DataTypes.STRING,
      allowNull: false,
      comment: "话题分类名字",
    },
    sort: {
      type: DataTypes.INTEGER,
      allowNull: false,
      comment: "话题分类排序",
    },
  },
  {
    sequelize: sequelize,
    tableName: "topicCategory",
    underscored: true, //显示在数据库字段为下划线
    paranoid: true, //软删除
  }
);

module.exports = TopicCategory;
